package com.niuwa.p2p.core.utils;

import java.math.BigInteger;
import java.util.UUID;

/**
 * 
 * @title UUIDUtil.java
 *
 * @author tennyqin
 * @version 1.0
 * @created 2015年4月9日
 */
public class UUIDUtil {

	public static BigInteger getBigIntegerUUid() {
		UUID uuid = UUID.randomUUID();
		String str = uuid.toString();
		str = str.replaceAll("-", "");
		BigInteger integer = new BigInteger(str, 16);
		return integer;
	}

	public static String getStringUUid() {
		UUID uuid = UUID.randomUUID();
		String str = uuid.toString();
		str = str.replaceAll("-", "");
		return str;
	}
}
